package com.oms.app.order.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.oms.app.order.model.Order;
import com.oms.core.service.IGeneralService;

/**
 * @author Loong_Mit
 * @date Sep 1, 2012 6:30:14 PM
 */

public interface IOrderService extends IGeneralService<Order, String> {

	/**
	 * 获取订单列表集合
	 * @param request
	 * @return
	 * Administrator
	 */
	public List<Order> getOrderList(HttpServletRequest request);
	
	/**
	 * 审核通过订单
	 * @param orderIds
	 * @return
	 * Administrator
	 */
	public boolean auditOrder(String orderIds, String status);
	
	/**
	 * 删除订单
	 * @param orderId
	 * @return
	 * Administrator
	 */
	public boolean deleteOrder(String PK);
	
	/**
	 * 获得订单详情
	 */
	public List<Map<String, Object>> getOrderDetailList(String orderId);
	
	/**
	 * 更改订单详情表的状态
	 * STATUS: 0-订单取消，1-正常，2-商家取消，3-用户取消
	 * 状态修改需要判断该管理员是商家还是用户
	 * @param detailId
	 * @param status
	 * @return
	 * Administrator
	 */
	public boolean changeDetailStatus(String detailId, String status);
	
	/**
	 * 通过orderId删除订单详情信息，与订单级联删除
	 * @param orderId
	 * @return
	 * Administrator
	 */
	public boolean delDetailsByOrderId(String orderId);
	
	/**
	 * 通过ORDERS_DETAILS主键删除订单详情信息
	 * @param PK
	 * @return
	 * Administrator
	 */
	public boolean delOrderDetailsByPK(String PK);
}
